Integrand size = 41, antiderivative size = 215 \[ \int \frac {\sec ^3(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{a+b \sec (c+d x)} \, dx=\frac {\left (2 a^2 b B+b^3 B-2 a^3 C-a b^2 (2 A+C)\right ) \text {arctanh}(\sin (c+d x))}{2 b^4 d}+\frac {2 a^2 \left (A b^2-a (b B-a C)\right ) \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{\sqrt {a-b} b^4 \sqrt {a+b} d}+\frac {\left (3 A b^2-3 a b B+3 a^2 C+2 b^2 C\right ) \tan (c+d x)}{3 b^3 d}+\frac {(b B-a C) \sec (c+d x) \tan (c+d x)}{2 b^2 d}+\frac {C \sec ^2(c+d x) \tan (c+d x)}{3 b d} \]
1/2*(2*B*a^2*b+B*b^3-2*a^3*C-a*b^2*(2*A+C))*arctanh(sin(d*x+c))/b^4/d+2*a^ 2*(A*b^2-a*(B*b-C*a))*arctanh((a-b)^(1/2)*tan(1/2*d*x+1/2*c)/(a+b)^(1/2))/ b^4/d/(a-b)^(1/2)/(a+b)^(1/2)+1/3*(3*A*b^2-3*B*a*b+3*C*a^2+2*C*b^2)*tan(d* x+c)/b^3/d+1/2*(B*b-C*a)*sec(d*x+c)*tan(d*x+c)/b^2/d+1/3*C*sec(d*x+c)^2*ta n(d*x+c)/b/d
Result contains complex when optimal does not.
Time = 4.24 (sec) , antiderivative size = 512, normalized size of antiderivative = 2.38 \[ \int \frac {\sec ^3(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{a+b \sec (c+d x)} \, dx=\frac {(b+a \cos (c+d x)) \sec ^2(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \left (12 \left (-2 a^2 b B-b^3 B+2 a^3 C+a b^2 (2 A+C)\right ) \cos ^3(c+d x) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-12 \left (-2 a^2 b B-b^3 B+2 a^3 C+a b^2 (2 A+C)\right ) \cos ^3(c+d x) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )-\frac {48 i a^2 \left (A b^2+a (-b B+a C)\right ) \arctan \left (\frac {(i \cos (c)+\sin (c)) \left (a \sin (c)+(-b+a \cos (c)) \tan \left (\frac {d x}{2}\right )\right )}{\sqrt {a^2-b^2} \sqrt {(\cos (c)-i \sin (c))^2}}\right ) \cos ^3(c+d x) (\cos (c)-i \sin (c))}{\sqrt {a^2-b^2} \sqrt {(\cos (c)-i \sin (c))^2}}+b \sec (c) \left (12 \left (A b^2-a b B+a^2 C+b^2 C\right ) \sin (d x)-6 \left (A b^2-a b B+a^2 C\right ) \sin (2 c+d x)+3 b^2 B \sin (c+2 d x)-3 a b C \sin (c+2 d x)+3 b^2 B \sin (3 c+2 d x)-3 a b C \sin (3 c+2 d x)+6 A b^2 \sin (2 c+3 d x)-6 a b B \sin (2 c+3 d x)+6 a^2 C \sin (2 c+3 d x)+4 b^2 C \sin (2 c+3 d x)\right )\right )}{12 b^4 d (A+2 C+2 B \cos (c+d x)+A \cos (2 (c+d x))) (a+b \sec (c+d x))} \]
((b + a*Cos[c + d*x])*Sec[c + d*x]^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^ 2)*(12*(-2*a^2*b*B - b^3*B + 2*a^3*C + a*b^2*(2*A + C))*Cos[c + d*x]^3*Log [Cos[(c + d*x)/2] - Sin[(c + d*x)/2]] - 12*(-2*a^2*b*B - b^3*B + 2*a^3*C + a*b^2*(2*A + C))*Cos[c + d*x]^3*Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]] - ((48*I)*a^2*(A*b^2 + a*(-(b*B) + a*C))*ArcTan[((I*Cos[c] + Sin[c])*(a*Si n[c] + (-b + a*Cos[c])*Tan[(d*x)/2]))/(Sqrt[a^2 - b^2]*Sqrt[(Cos[c] - I*Si n[c])^2])]*Cos[c + d*x]^3*(Cos[c] - I*Sin[c]))/(Sqrt[a^2 - b^2]*Sqrt[(Cos[ c] - I*Sin[c])^2]) + b*Sec[c]*(12*(A*b^2 - a*b*B + a^2*C + b^2*C)*Sin[d*x] - 6*(A*b^2 - a*b*B + a^2*C)*Sin[2*c + d*x] + 3*b^2*B*Sin[c + 2*d*x] - 3*a *b*C*Sin[c + 2*d*x] + 3*b^2*B*Sin[3*c + 2*d*x] - 3*a*b*C*Sin[3*c + 2*d*x] + 6*A*b^2*Sin[2*c + 3*d*x] - 6*a*b*B*Sin[2*c + 3*d*x] + 6*a^2*C*Sin[2*c + 3*d*x] + 4*b^2*C*Sin[2*c + 3*d*x])))/(12*b^4*d*(A + 2*C + 2*B*Cos[c + d*x] + A*Cos[2*(c + d*x)])*(a + b*Sec[c + d*x]))
Time = 1.57 (sec) , antiderivative size = 232, normalized size of antiderivative = 1.08, number of steps used = 16, number of rules used = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.366, Rules used = {3042, 4590, 3042, 4580, 3042, 4570, 27, 3042, 4486, 3042, 4257, 4318, 3042, 3138, 221}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sec ^3(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{a+b \sec (c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )^3 \left (A+B \csc \left (c+d x+\frac {\pi }{2}\right )+C \csc \left (c+d x+\frac {\pi }{2}\right )^2\right )}{a+b \csc \left (c+d x+\frac {\pi }{2}\right )}dx\) |
\(\Big \downarrow \) 4590 |
\(\displaystyle \frac {\int \frac {\sec ^2(c+d x) \left (3 (b B-a C) \sec ^2(c+d x)+b (3 A+2 C) \sec (c+d x)+2 a C\right )}{a+b \sec (c+d x)}dx}{3 b}+\frac {C \tan (c+d x) \sec ^2(c+d x)}{3 b d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )^2 \left (3 (b B-a C) \csc \left (c+d x+\frac {\pi }{2}\right )^2+b (3 A+2 C) \csc \left (c+d x+\frac {\pi }{2}\right )+2 a C\right )}{a+b \csc \left (c+d x+\frac {\pi }{2}\right )}dx}{3 b}+\frac {C \tan (c+d x) \sec ^2(c+d x)}{3 b d}\) |
\(\Big \downarrow \) 4580 |
\(\displaystyle \frac {\frac {\int \frac {\sec (c+d x) \left (2 \left (3 C a^2-3 b B a+3 A b^2+2 b^2 C\right ) \sec ^2(c+d x)+b (3 b B+a C) \sec (c+d x)+3 a (b B-a C)\right )}{a+b \sec (c+d x)}dx}{2 b}+\frac {3 (b B-a C) \tan (c+d x) \sec (c+d x)}{2 b d}}{3 b}+\frac {C \tan (c+d x) \sec ^2(c+d x)}{3 b d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\int \frac {\csc \left (c+d x+\frac {\pi }{2}\right ) \left (2 \left (3 C a^2-3 b B a+3 A b^2+2 b^2 C\right ) \csc \left (c+d x+\frac {\pi }{2}\right )^2+b (3 b B+a C) \csc \left (c+d x+\frac {\pi }{2}\right )+3 a (b B-a C)\right )}{a+b \csc \left (c+d x+\frac {\pi }{2}\right )}dx}{2 b}+\frac {3 (b B-a C) \tan (c+d x) \sec (c+d x)}{2 b d}}{3 b}+\frac {C \tan (c+d x) \sec ^2(c+d x)}{3 b d}\) |
\(\Big \downarrow \) 4570 |
\(\displaystyle \frac {\frac {\frac {\int \frac {3 \sec (c+d x) \left (a b (b B-a C)+\left (-2 C a^3+2 b B a^2-b^2 (2 A+C) a+b^3 B\right ) \sec (c+d x)\right )}{a+b \sec (c+d x)}dx}{b}+\frac {2 \tan (c+d x) \left (3 a^2 C-3 a b B+3 A b^2+2 b^2 C\right )}{b d}}{2 b}+\frac {3 (b B-a C) \tan (c+d x) \sec (c+d x)}{2 b d}}{3 b}+\frac {C \tan (c+d x) \sec ^2(c+d x)}{3 b d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\frac {\frac {3 \int \frac {\sec (c+d x) \left (a b (b B-a C)+\left (-2 C a^3+2 b B a^2-b^2 (2 A+C) a+b^3 B\right ) \sec (c+d x)\right )}{a+b \sec (c+d x)}dx}{b}+\frac {2 \tan (c+d x) \left (3 a^2 C-3 a b B+3 A b^2+2 b^2 C\right )}{b d}}{2 b}+\frac {3 (b B-a C) \tan (c+d x) \sec (c+d x)}{2 b d}}{3 b}+\frac {C \tan (c+d x) \sec ^2(c+d x)}{3 b d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\frac {3 \int \frac {\csc \left (c+d x+\frac {\pi }{2}\right ) \left (a b (b B-a C)+\left (-2 C a^3+2 b B a^2-b^2 (2 A+C) a+b^3 B\right ) \csc \left (c+d x+\frac {\pi }{2}\right )\right )}{a+b \csc \left (c+d x+\frac {\pi }{2}\right )}dx}{b}+\frac {2 \tan (c+d x) \left (3 a^2 C-3 a b B+3 A b^2+2 b^2 C\right )}{b d}}{2 b}+\frac {3 (b B-a C) \tan (c+d x) \sec (c+d x)}{2 b d}}{3 b}+\frac {C \tan (c+d x) \sec ^2(c+d x)}{3 b d}\) |
\(\Big \downarrow \) 4486 |
\(\displaystyle \frac {\frac {\frac {3 \left (\frac {2 a^2 \left (A b^2-a (b B-a C)\right ) \int \frac {\sec (c+d x)}{a+b \sec (c+d x)}dx}{b}+\frac {\left (-2 a^3 C+2 a^2 b B-a b^2 (2 A+C)+b^3 B\right ) \int \sec (c+d x)dx}{b}\right )}{b}+\frac {2 \tan (c+d x) \left (3 a^2 C-3 a b B+3 A b^2+2 b^2 C\right )}{b d}}{2 b}+\frac {3 (b B-a C) \tan (c+d x) \sec (c+d x)}{2 b d}}{3 b}+\frac {C \tan (c+d x) \sec ^2(c+d x)}{3 b d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\frac {3 \left (\frac {2 a^2 \left (A b^2-a (b B-a C)\right ) \int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )}{a+b \csc \left (c+d x+\frac {\pi }{2}\right )}dx}{b}+\frac {\left (-2 a^3 C+2 a^2 b B-a b^2 (2 A+C)+b^3 B\right ) \int \csc \left (c+d x+\frac {\pi }{2}\right )dx}{b}\right )}{b}+\frac {2 \tan (c+d x) \left (3 a^2 C-3 a b B+3 A b^2+2 b^2 C\right )}{b d}}{2 b}+\frac {3 (b B-a C) \tan (c+d x) \sec (c+d x)}{2 b d}}{3 b}+\frac {C \tan (c+d x) \sec ^2(c+d x)}{3 b d}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {\frac {\frac {3 \left (\frac {2 a^2 \left (A b^2-a (b B-a C)\right ) \int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )}{a+b \csc \left (c+d x+\frac {\pi }{2}\right )}dx}{b}+\frac {\left (-2 a^3 C+2 a^2 b B-a b^2 (2 A+C)+b^3 B\right ) \text {arctanh}(\sin (c+d x))}{b d}\right )}{b}+\frac {2 \tan (c+d x) \left (3 a^2 C-3 a b B+3 A b^2+2 b^2 C\right )}{b d}}{2 b}+\frac {3 (b B-a C) \tan (c+d x) \sec (c+d x)}{2 b d}}{3 b}+\frac {C \tan (c+d x) \sec ^2(c+d x)}{3 b d}\) |
\(\Big \downarrow \) 4318 |
\(\displaystyle \frac {\frac {\frac {3 \left (\frac {2 a^2 \left (A b^2-a (b B-a C)\right ) \int \frac {1}{\frac {a \cos (c+d x)}{b}+1}dx}{b^2}+\frac {\left (-2 a^3 C+2 a^2 b B-a b^2 (2 A+C)+b^3 B\right ) \text {arctanh}(\sin (c+d x))}{b d}\right )}{b}+\frac {2 \tan (c+d x) \left (3 a^2 C-3 a b B+3 A b^2+2 b^2 C\right )}{b d}}{2 b}+\frac {3 (b B-a C) \tan (c+d x) \sec (c+d x)}{2 b d}}{3 b}+\frac {C \tan (c+d x) \sec ^2(c+d x)}{3 b d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\frac {3 \left (\frac {2 a^2 \left (A b^2-a (b B-a C)\right ) \int \frac {1}{\frac {a \sin \left (c+d x+\frac {\pi }{2}\right )}{b}+1}dx}{b^2}+\frac {\left (-2 a^3 C+2 a^2 b B-a b^2 (2 A+C)+b^3 B\right ) \text {arctanh}(\sin (c+d x))}{b d}\right )}{b}+\frac {2 \tan (c+d x) \left (3 a^2 C-3 a b B+3 A b^2+2 b^2 C\right )}{b d}}{2 b}+\frac {3 (b B-a C) \tan (c+d x) \sec (c+d x)}{2 b d}}{3 b}+\frac {C \tan (c+d x) \sec ^2(c+d x)}{3 b d}\) |
\(\Big \downarrow \) 3138 |
\(\displaystyle \frac {\frac {\frac {3 \left (\frac {4 a^2 \left (A b^2-a (b B-a C)\right ) \int \frac {1}{\left (1-\frac {a}{b}\right ) \tan ^2\left (\frac {1}{2} (c+d x)\right )+\frac {a+b}{b}}d\tan \left (\frac {1}{2} (c+d x)\right )}{b^2 d}+\frac {\left (-2 a^3 C+2 a^2 b B-a b^2 (2 A+C)+b^3 B\right ) \text {arctanh}(\sin (c+d x))}{b d}\right )}{b}+\frac {2 \tan (c+d x) \left (3 a^2 C-3 a b B+3 A b^2+2 b^2 C\right )}{b d}}{2 b}+\frac {3 (b B-a C) \tan (c+d x) \sec (c+d x)}{2 b d}}{3 b}+\frac {C \tan (c+d x) \sec ^2(c+d x)}{3 b d}\) |
\(\Big \downarrow \) 221 |
\(\displaystyle \frac {\frac {\frac {2 \tan (c+d x) \left (3 a^2 C-3 a b B+3 A b^2+2 b^2 C\right )}{b d}+\frac {3 \left (\frac {4 a^2 \left (A b^2-a (b B-a C)\right ) \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{b d \sqrt {a-b} \sqrt {a+b}}+\frac {\left (-2 a^3 C+2 a^2 b B-a b^2 (2 A+C)+b^3 B\right ) \text {arctanh}(\sin (c+d x))}{b d}\right )}{b}}{2 b}+\frac {3 (b B-a C) \tan (c+d x) \sec (c+d x)}{2 b d}}{3 b}+\frac {C \tan (c+d x) \sec ^2(c+d x)}{3 b d}\) |
(C*Sec[c + d*x]^2*Tan[c + d*x])/(3*b*d) + ((3*(b*B - a*C)*Sec[c + d*x]*Tan [c + d*x])/(2*b*d) + ((3*(((2*a^2*b*B + b^3*B - 2*a^3*C - a*b^2*(2*A + C)) *ArcTanh[Sin[c + d*x]])/(b*d) + (4*a^2*(A*b^2 - a*(b*B - a*C))*ArcTanh[(Sq rt[a - b]*Tan[(c + d*x)/2])/Sqrt[a + b]])/(Sqrt[a - b]*b*Sqrt[a + b]*d)))/ b + (2*(3*A*b^2 - 3*a*b*B + 3*a^2*C + 2*b^2*C)*Tan[c + d*x])/(b*d))/(2*b)) /(3*b)
3.9.100.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x /Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{ e = FreeFactors[Tan[(c + d*x)/2], x]}, Simp[2*(e/d) Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Int[csc[(e_.) + (f_.)*(x_)]/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbo l] :> Simp[1/b Int[1/(1 + (a/b)*Sin[e + f*x]), x], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 - b^2, 0]
Int[(csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)))/(csc[( e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[B/b Int[Csc[e + f*x], x], x] + Simp[(A*b - a*B)/b Int[Csc[e + f*x]/(a + b*Csc[e + f*x]), x], x ] /; FreeQ[{a, b, e, f, A, B}, x] && NeQ[A*b - a*B, 0]
Int[csc[(e_.) + (f_.)*(x_)]*((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e _.) + (f_.)*(x_)]^2*(C_.))*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_S ymbol] :> Simp[(-C)*Cot[e + f*x]*((a + b*Csc[e + f*x])^(m + 1)/(b*f*(m + 2) )), x] + Simp[1/(b*(m + 2)) Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^m*Simp[ b*A*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && !LtQ[m, -1]
Int[csc[(e_.) + (f_.)*(x_)]^2*((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[ (e_.) + (f_.)*(x_)]^2*(C_.))*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x _Symbol] :> Simp[(-C)*Csc[e + f*x]*Cot[e + f*x]*((a + b*Csc[e + f*x])^(m + 1)/(b*f*(m + 3))), x] + Simp[1/(b*(m + 3)) Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^m*Simp[a*C + b*(C*(m + 2) + A*(m + 3))*Csc[e + f*x] - (2*a*C - b*B* (m + 3))*Csc[e + f*x]^2, x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] & & NeQ[a^2 - b^2, 0] && !LtQ[m, -1]
Int[((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_. ))*(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a _))^(m_), x_Symbol] :> Simp[(-C)*d*Cot[e + f*x]*(a + b*Csc[e + f*x])^(m + 1 )*((d*Csc[e + f*x])^(n - 1)/(b*f*(m + n + 1))), x] + Simp[d/(b*(m + n + 1)) Int[(a + b*Csc[e + f*x])^m*(d*Csc[e + f*x])^(n - 1)*Simp[a*C*(n - 1) + ( A*b*(m + n + 1) + b*C*(m + n))*Csc[e + f*x] + (b*B*(m + n + 1) - a*C*n)*Csc [e + f*x]^2, x], x], x] /; FreeQ[{a, b, d, e, f, A, B, C, m}, x] && NeQ[a^2 - b^2, 0] && GtQ[n, 0]
Time = 0.58 (sec) , antiderivative size = 369, normalized size of antiderivative = 1.72
method | result | size |
derivativedivides | \(\frac {-\frac {C}{3 b \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {-B b +C a +C b}{2 b^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {\left (2 a A \,b^{2}-2 B \,a^{2} b -B \,b^{3}+2 a^{3} C +C a \,b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2 b^{4}}-\frac {2 A \,b^{2}-2 B a b -B \,b^{2}+2 C \,a^{2}+C a b +2 C \,b^{2}}{2 b^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {2 a^{2} \left (A \,b^{2}-B a b +C \,a^{2}\right ) \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{b^{4} \sqrt {\left (a +b \right ) \left (a -b \right )}}-\frac {C}{3 b \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {B b -C a -C b}{2 b^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {\left (-2 a A \,b^{2}+2 B \,a^{2} b +B \,b^{3}-2 a^{3} C -C a \,b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2 b^{4}}-\frac {2 A \,b^{2}-2 B a b -B \,b^{2}+2 C \,a^{2}+C a b +2 C \,b^{2}}{2 b^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}}{d}\) | \(369\) |
default | \(\frac {-\frac {C}{3 b \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {-B b +C a +C b}{2 b^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {\left (2 a A \,b^{2}-2 B \,a^{2} b -B \,b^{3}+2 a^{3} C +C a \,b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2 b^{4}}-\frac {2 A \,b^{2}-2 B a b -B \,b^{2}+2 C \,a^{2}+C a b +2 C \,b^{2}}{2 b^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {2 a^{2} \left (A \,b^{2}-B a b +C \,a^{2}\right ) \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{b^{4} \sqrt {\left (a +b \right ) \left (a -b \right )}}-\frac {C}{3 b \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {B b -C a -C b}{2 b^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {\left (-2 a A \,b^{2}+2 B \,a^{2} b +B \,b^{3}-2 a^{3} C -C a \,b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2 b^{4}}-\frac {2 A \,b^{2}-2 B a b -B \,b^{2}+2 C \,a^{2}+C a b +2 C \,b^{2}}{2 b^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}}{d}\) | \(369\) |
risch | \(\frac {i \left (-3 B \,b^{2} {\mathrm e}^{5 i \left (d x +c \right )}+3 C a b \,{\mathrm e}^{5 i \left (d x +c \right )}+6 A \,b^{2} {\mathrm e}^{4 i \left (d x +c \right )}-6 B a b \,{\mathrm e}^{4 i \left (d x +c \right )}+6 C \,a^{2} {\mathrm e}^{4 i \left (d x +c \right )}+12 A \,b^{2} {\mathrm e}^{2 i \left (d x +c \right )}-12 B a b \,{\mathrm e}^{2 i \left (d x +c \right )}+12 C \,a^{2} {\mathrm e}^{2 i \left (d x +c \right )}+12 C \,b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+3 B \,b^{2} {\mathrm e}^{i \left (d x +c \right )}-3 C b a \,{\mathrm e}^{i \left (d x +c \right )}+6 A \,b^{2}-6 B a b +6 C \,a^{2}+4 C \,b^{2}\right )}{3 d \,b^{3} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{3}}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) a A}{b^{2} d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B \,a^{2}}{b^{3} d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B}{2 b d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) a^{3} C}{b^{4} d}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{2 b^{2} d}+\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a^{2}-i b^{2}+\sqrt {a^{2}-b^{2}}\, b}{a \sqrt {a^{2}-b^{2}}}\right ) A}{\sqrt {a^{2}-b^{2}}\, d \,b^{2}}-\frac {a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a^{2}-i b^{2}+\sqrt {a^{2}-b^{2}}\, b}{a \sqrt {a^{2}-b^{2}}}\right ) B}{\sqrt {a^{2}-b^{2}}\, d \,b^{3}}+\frac {a^{4} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a^{2}-i b^{2}+\sqrt {a^{2}-b^{2}}\, b}{a \sqrt {a^{2}-b^{2}}}\right ) C}{\sqrt {a^{2}-b^{2}}\, d \,b^{4}}-\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {i a^{2}-i b^{2}-\sqrt {a^{2}-b^{2}}\, b}{a \sqrt {a^{2}-b^{2}}}\right ) A}{\sqrt {a^{2}-b^{2}}\, d \,b^{2}}+\frac {a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {i a^{2}-i b^{2}-\sqrt {a^{2}-b^{2}}\, b}{a \sqrt {a^{2}-b^{2}}}\right ) B}{\sqrt {a^{2}-b^{2}}\, d \,b^{3}}-\frac {a^{4} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {i a^{2}-i b^{2}-\sqrt {a^{2}-b^{2}}\, b}{a \sqrt {a^{2}-b^{2}}}\right ) C}{\sqrt {a^{2}-b^{2}}\, d \,b^{4}}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) a A}{b^{2} d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B \,a^{2}}{b^{3} d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B}{2 b d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) a^{3} C}{b^{4} d}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{2 b^{2} d}\) | \(895\) |
1/d*(-1/3*C/b/(tan(1/2*d*x+1/2*c)-1)^3-1/2*(-B*b+C*a+C*b)/b^2/(tan(1/2*d*x +1/2*c)-1)^2+1/2*(2*A*a*b^2-2*B*a^2*b-B*b^3+2*C*a^3+C*a*b^2)/b^4*ln(tan(1/ 2*d*x+1/2*c)-1)-1/2*(2*A*b^2-2*B*a*b-B*b^2+2*C*a^2+C*a*b+2*C*b^2)/b^3/(tan (1/2*d*x+1/2*c)-1)+2*a^2*(A*b^2-B*a*b+C*a^2)/b^4/((a+b)*(a-b))^(1/2)*arcta nh((a-b)*tan(1/2*d*x+1/2*c)/((a+b)*(a-b))^(1/2))-1/3*C/b/(tan(1/2*d*x+1/2* c)+1)^3-1/2*(B*b-C*a-C*b)/b^2/(tan(1/2*d*x+1/2*c)+1)^2+1/2/b^4*(-2*A*a*b^2 +2*B*a^2*b+B*b^3-2*C*a^3-C*a*b^2)*ln(tan(1/2*d*x+1/2*c)+1)-1/2*(2*A*b^2-2* B*a*b-B*b^2+2*C*a^2+C*a*b+2*C*b^2)/b^3/(tan(1/2*d*x+1/2*c)+1))
Time = 12.79 (sec) , antiderivative size = 817, normalized size of antiderivative = 3.80 \[ \int \frac {\sec ^3(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{a+b \sec (c+d x)} \, dx=\left [\frac {6 \, {\left (C a^{4} - B a^{3} b + A a^{2} b^{2}\right )} \sqrt {a^{2} - b^{2}} \cos \left (d x + c\right )^{3} \log \left (\frac {2 \, a b \cos \left (d x + c\right ) - {\left (a^{2} - 2 \, b^{2}\right )} \cos \left (d x + c\right )^{2} + 2 \, \sqrt {a^{2} - b^{2}} {\left (b \cos \left (d x + c\right ) + a\right )} \sin \left (d x + c\right ) + 2 \, a^{2} - b^{2}}{a^{2} \cos \left (d x + c\right )^{2} + 2 \, a b \cos \left (d x + c\right ) + b^{2}}\right ) - 3 \, {\left (2 \, C a^{5} - 2 \, B a^{4} b + {\left (2 \, A - C\right )} a^{3} b^{2} + B a^{2} b^{3} - {\left (2 \, A + C\right )} a b^{4} + B b^{5}\right )} \cos \left (d x + c\right )^{3} \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, {\left (2 \, C a^{5} - 2 \, B a^{4} b + {\left (2 \, A - C\right )} a^{3} b^{2} + B a^{2} b^{3} - {\left (2 \, A + C\right )} a b^{4} + B b^{5}\right )} \cos \left (d x + c\right )^{3} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (2 \, C a^{2} b^{3} - 2 \, C b^{5} + 2 \, {\left (3 \, C a^{4} b - 3 \, B a^{3} b^{2} + {\left (3 \, A - C\right )} a^{2} b^{3} + 3 \, B a b^{4} - {\left (3 \, A + 2 \, C\right )} b^{5}\right )} \cos \left (d x + c\right )^{2} - 3 \, {\left (C a^{3} b^{2} - B a^{2} b^{3} - C a b^{4} + B b^{5}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{12 \, {\left (a^{2} b^{4} - b^{6}\right )} d \cos \left (d x + c\right )^{3}}, \frac {12 \, {\left (C a^{4} - B a^{3} b + A a^{2} b^{2}\right )} \sqrt {-a^{2} + b^{2}} \arctan \left (-\frac {\sqrt {-a^{2} + b^{2}} {\left (b \cos \left (d x + c\right ) + a\right )}}{{\left (a^{2} - b^{2}\right )} \sin \left (d x + c\right )}\right ) \cos \left (d x + c\right )^{3} - 3 \, {\left (2 \, C a^{5} - 2 \, B a^{4} b + {\left (2 \, A - C\right )} a^{3} b^{2} + B a^{2} b^{3} - {\left (2 \, A + C\right )} a b^{4} + B b^{5}\right )} \cos \left (d x + c\right )^{3} \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, {\left (2 \, C a^{5} - 2 \, B a^{4} b + {\left (2 \, A - C\right )} a^{3} b^{2} + B a^{2} b^{3} - {\left (2 \, A + C\right )} a b^{4} + B b^{5}\right )} \cos \left (d x + c\right )^{3} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (2 \, C a^{2} b^{3} - 2 \, C b^{5} + 2 \, {\left (3 \, C a^{4} b - 3 \, B a^{3} b^{2} + {\left (3 \, A - C\right )} a^{2} b^{3} + 3 \, B a b^{4} - {\left (3 \, A + 2 \, C\right )} b^{5}\right )} \cos \left (d x + c\right )^{2} - 3 \, {\left (C a^{3} b^{2} - B a^{2} b^{3} - C a b^{4} + B b^{5}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{12 \, {\left (a^{2} b^{4} - b^{6}\right )} d \cos \left (d x + c\right )^{3}}\right ] \]
integrate(sec(d*x+c)^3*(A+B*sec(d*x+c)+C*sec(d*x+c)^2)/(a+b*sec(d*x+c)),x, algorithm="fricas")
[1/12*(6*(C*a^4 - B*a^3*b + A*a^2*b^2)*sqrt(a^2 - b^2)*cos(d*x + c)^3*log( (2*a*b*cos(d*x + c) - (a^2 - 2*b^2)*cos(d*x + c)^2 + 2*sqrt(a^2 - b^2)*(b* cos(d*x + c) + a)*sin(d*x + c) + 2*a^2 - b^2)/(a^2*cos(d*x + c)^2 + 2*a*b* cos(d*x + c) + b^2)) - 3*(2*C*a^5 - 2*B*a^4*b + (2*A - C)*a^3*b^2 + B*a^2* b^3 - (2*A + C)*a*b^4 + B*b^5)*cos(d*x + c)^3*log(sin(d*x + c) + 1) + 3*(2 *C*a^5 - 2*B*a^4*b + (2*A - C)*a^3*b^2 + B*a^2*b^3 - (2*A + C)*a*b^4 + B*b ^5)*cos(d*x + c)^3*log(-sin(d*x + c) + 1) + 2*(2*C*a^2*b^3 - 2*C*b^5 + 2*( 3*C*a^4*b - 3*B*a^3*b^2 + (3*A - C)*a^2*b^3 + 3*B*a*b^4 - (3*A + 2*C)*b^5) *cos(d*x + c)^2 - 3*(C*a^3*b^2 - B*a^2*b^3 - C*a*b^4 + B*b^5)*cos(d*x + c) )*sin(d*x + c))/((a^2*b^4 - b^6)*d*cos(d*x + c)^3), 1/12*(12*(C*a^4 - B*a^ 3*b + A*a^2*b^2)*sqrt(-a^2 + b^2)*arctan(-sqrt(-a^2 + b^2)*(b*cos(d*x + c) + a)/((a^2 - b^2)*sin(d*x + c)))*cos(d*x + c)^3 - 3*(2*C*a^5 - 2*B*a^4*b + (2*A - C)*a^3*b^2 + B*a^2*b^3 - (2*A + C)*a*b^4 + B*b^5)*cos(d*x + c)^3* log(sin(d*x + c) + 1) + 3*(2*C*a^5 - 2*B*a^4*b + (2*A - C)*a^3*b^2 + B*a^2 *b^3 - (2*A + C)*a*b^4 + B*b^5)*cos(d*x + c)^3*log(-sin(d*x + c) + 1) + 2* (2*C*a^2*b^3 - 2*C*b^5 + 2*(3*C*a^4*b - 3*B*a^3*b^2 + (3*A - C)*a^2*b^3 + 3*B*a*b^4 - (3*A + 2*C)*b^5)*cos(d*x + c)^2 - 3*(C*a^3*b^2 - B*a^2*b^3 - C *a*b^4 + B*b^5)*cos(d*x + c))*sin(d*x + c))/((a^2*b^4 - b^6)*d*cos(d*x + c )^3)]
\[ \int \frac {\sec ^3(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{a+b \sec (c+d x)} \, dx=\int \frac {\left (A + B \sec {\left (c + d x \right )} + C \sec ^{2}{\left (c + d x \right )}\right ) \sec ^{3}{\left (c + d x \right )}}{a + b \sec {\left (c + d x \right )}}\, dx \]
Exception generated. \[ \int \frac {\sec ^3(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{a+b \sec (c+d x)} \, dx=\text {Exception raised: ValueError} \]
integrate(sec(d*x+c)^3*(A+B*sec(d*x+c)+C*sec(d*x+c)^2)/(a+b*sec(d*x+c)),x, algorithm="maxima")
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*a^2-4*b^2>0)', see `assume?` f or more de
Leaf count of result is larger than twice the leaf count of optimal. 483 vs. \(2 (197) = 394\).
Time = 0.35 (sec) , antiderivative size = 483, normalized size of antiderivative = 2.25 \[ \int \frac {\sec ^3(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{a+b \sec (c+d x)} \, dx=-\frac {\frac {3 \, {\left (2 \, C a^{3} - 2 \, B a^{2} b + 2 \, A a b^{2} + C a b^{2} - B b^{3}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{b^{4}} - \frac {3 \, {\left (2 \, C a^{3} - 2 \, B a^{2} b + 2 \, A a b^{2} + C a b^{2} - B b^{3}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{b^{4}} - \frac {12 \, {\left (C a^{4} - B a^{3} b + A a^{2} b^{2}\right )} {\left (\pi \left \lfloor \frac {d x + c}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (-2 \, a + 2 \, b\right ) + \arctan \left (-\frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\sqrt {-a^{2} + b^{2}}}\right )\right )}}{\sqrt {-a^{2} + b^{2}} b^{4}} + \frac {2 \, {\left (6 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 6 \, B a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 3 \, C a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 6 \, A b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 3 \, B b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 6 \, C b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 12 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 12 \, B a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 12 \, A b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 4 \, C b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 6 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 6 \, B a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 3 \, C a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 6 \, A b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, B b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 6 \, C b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{3} b^{3}}}{6 \, d} \]
-1/6*(3*(2*C*a^3 - 2*B*a^2*b + 2*A*a*b^2 + C*a*b^2 - B*b^3)*log(abs(tan(1/ 2*d*x + 1/2*c) + 1))/b^4 - 3*(2*C*a^3 - 2*B*a^2*b + 2*A*a*b^2 + C*a*b^2 - B*b^3)*log(abs(tan(1/2*d*x + 1/2*c) - 1))/b^4 - 12*(C*a^4 - B*a^3*b + A*a^ 2*b^2)*(pi*floor(1/2*(d*x + c)/pi + 1/2)*sgn(-2*a + 2*b) + arctan(-(a*tan( 1/2*d*x + 1/2*c) - b*tan(1/2*d*x + 1/2*c))/sqrt(-a^2 + b^2)))/(sqrt(-a^2 + b^2)*b^4) + 2*(6*C*a^2*tan(1/2*d*x + 1/2*c)^5 - 6*B*a*b*tan(1/2*d*x + 1/2 *c)^5 + 3*C*a*b*tan(1/2*d*x + 1/2*c)^5 + 6*A*b^2*tan(1/2*d*x + 1/2*c)^5 - 3*B*b^2*tan(1/2*d*x + 1/2*c)^5 + 6*C*b^2*tan(1/2*d*x + 1/2*c)^5 - 12*C*a^2 *tan(1/2*d*x + 1/2*c)^3 + 12*B*a*b*tan(1/2*d*x + 1/2*c)^3 - 12*A*b^2*tan(1 /2*d*x + 1/2*c)^3 - 4*C*b^2*tan(1/2*d*x + 1/2*c)^3 + 6*C*a^2*tan(1/2*d*x + 1/2*c) - 6*B*a*b*tan(1/2*d*x + 1/2*c) - 3*C*a*b*tan(1/2*d*x + 1/2*c) + 6* A*b^2*tan(1/2*d*x + 1/2*c) + 3*B*b^2*tan(1/2*d*x + 1/2*c) + 6*C*b^2*tan(1/ 2*d*x + 1/2*c))/((tan(1/2*d*x + 1/2*c)^2 - 1)^3*b^3))/d
Time = 26.26 (sec) , antiderivative size = 7016, normalized size of antiderivative = 32.63 \[ \int \frac {\sec ^3(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{a+b \sec (c+d x)} \, dx=\text {Too large to display} \]
- ((tan(c/2 + (d*x)/2)^5*(2*A*b^2 - B*b^2 + 2*C*a^2 + 2*C*b^2 - 2*B*a*b + C*a*b))/b^3 - (4*tan(c/2 + (d*x)/2)^3*(3*A*b^2 + 3*C*a^2 + C*b^2 - 3*B*a*b ))/(3*b^3) + (tan(c/2 + (d*x)/2)*(2*A*b^2 + B*b^2 + 2*C*a^2 + 2*C*b^2 - 2* B*a*b - C*a*b))/b^3)/(d*(3*tan(c/2 + (d*x)/2)^2 - 3*tan(c/2 + (d*x)/2)^4 + tan(c/2 + (d*x)/2)^6 - 1)) - (atan(((((8*tan(c/2 + (d*x)/2)*(B^2*b^9 - 8* C^2*a^9 - 3*B^2*a*b^8 + 16*C^2*a^8*b + 4*A^2*a^2*b^7 - 12*A^2*a^3*b^6 + 16 *A^2*a^4*b^5 - 8*A^2*a^5*b^4 + 7*B^2*a^2*b^7 - 13*B^2*a^3*b^6 + 16*B^2*a^4 *b^5 - 16*B^2*a^5*b^4 + 16*B^2*a^6*b^3 - 8*B^2*a^7*b^2 + C^2*a^2*b^7 - 3*C ^2*a^3*b^6 + 7*C^2*a^4*b^5 - 13*C^2*a^5*b^4 + 16*C^2*a^6*b^3 - 16*C^2*a^7* b^2 - 4*A*B*a*b^8 - 2*B*C*a*b^8 + 16*B*C*a^8*b + 12*A*B*a^2*b^7 - 20*A*B*a ^3*b^6 + 28*A*B*a^4*b^5 - 32*A*B*a^5*b^4 + 16*A*B*a^6*b^3 + 4*A*C*a^2*b^7 - 12*A*C*a^3*b^6 + 20*A*C*a^4*b^5 - 28*A*C*a^5*b^4 + 32*A*C*a^6*b^3 - 16*A *C*a^7*b^2 + 6*B*C*a^2*b^7 - 14*B*C*a^3*b^6 + 26*B*C*a^4*b^5 - 32*B*C*a^5* b^4 + 32*B*C*a^6*b^3 - 32*B*C*a^7*b^2))/b^6 + (((8*(4*A*a^3*b^10 - 8*A*a^2 *b^11 - 2*B*b^13 - 2*B*a^2*b^11 + 6*B*a^3*b^10 - 4*B*a^4*b^9 - 2*C*a^2*b^1 1 + 2*C*a^3*b^10 - 6*C*a^4*b^9 + 4*C*a^5*b^8 + 4*A*a*b^12 + 2*B*a*b^12 + 2 *C*a*b^12))/b^9 + (8*tan(c/2 + (d*x)/2)*(8*a*b^10 - 16*a^2*b^9 + 8*a^3*b^8 )*((B*b^3)/2 - C*a^3 - b^2*(A*a + (C*a)/2) + B*a^2*b))/b^10)*((B*b^3)/2 - C*a^3 - b^2*(A*a + (C*a)/2) + B*a^2*b))/b^4)*((B*b^3)/2 - C*a^3 - b^2*(A*a + (C*a)/2) + B*a^2*b)*1i)/b^4 + (((8*tan(c/2 + (d*x)/2)*(B^2*b^9 - 8*C...